using Arcane.Source.Combat;
using Arcane.Source.Combat.SpellAction;
using Godot;

namespace Arcane.Source.Data;

public class SpellProto
{
    public string name;
    public string desc;
    public Texture2D icon;
    public ISpellAction[] actions;

    public void Cast(Entity entity)
    {
        if (actions.Length <= 0)
        {
            new Attack(1, 200, DamageType.Magical).Cast(entity);
            return;
        }

        foreach (var action in actions)
            action.Cast(entity);
    }
}